package com.example.dao;

import com.example.model.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Hello
 * @since 2024-07-03
 */
public interface UserMapper extends BaseMapper<User> {
    @Update("UPDATE user SET user_points=user_points- #{points} where user_id=#{user_id}")
    int deductPoints (@Param("user_id")Integer user_id,@Param("points") Integer points);
}
